package com.pine.service.core;

import com.pine.common.beans.request.BatchIdRequest;
import com.pine.common.beans.response.DeleteResponse;

/**
 * 删除服务
 *
 * @author pine manage
 * @since 2024-08-09
 */
public interface DeleteService<PrimaryKey, QueryRequest> {

    /**
     * 删除
     *
     * @param request 请求
     * @return DeleteResponse 响应
     */
    default DeleteResponse delete(QueryRequest request) {
        throw new UnsupportedOperationException();
    }

    /**
     * 删除
     *
     * @param request 主键列表请求
     * @return DeleteResponse 响应
     */
    DeleteResponse deleteByPrimaryKeys(BatchIdRequest<PrimaryKey> request);
}
